package org.codeanalyzer.report;

import org.codeanalyzer.model.ApiLibrary;

public abstract class UsageReportBuilder {

    private static final String WIKI = "wiki";
    private static final String EMMA = "emma";

    public static UsageReportBuilder getInstance()
    {
        String reportType = System.getProperty("report.type", WIKI);
        System.out.println("report.type = " + reportType);

        if (reportType.equalsIgnoreCase(WIKI)) {
            return new WikiUsageReportBuilder();
        }
        else if (reportType.equalsIgnoreCase(EMMA)) {
            return new EmmaXmlReportBuilder();
        }
        else {
            return new TxtUsageReportBuilder();
        }
    }

    public abstract void printReport(ApiLibrary apiLibrary, long elapsedTime, int numOfFiles);
}
